<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>实勘</title>
    <link rel="stylesheet" href="../../css/weui.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery.datetimepicker.css" />
    <link rel="stylesheet" href="../../css/amazeui.css">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
    
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body,
    html {
        width: 100%;
        background: #ebecf1;
        overflow-x: hidden;
    }

    header {
        text-align: center;
        height: 44px;
        line-height: 44px;
        position: relative;
    }

    .button {
        width: 80%;
        margin: 30px auto;
        display: block;
        outline: none;
    }

    .am-input-group-label {
        background: #fff;
        border: none;
        font-size: 14px;
    }

    .am-form-field {
        border: none;
        text-align: right;
        outline: none;
        padding-right: 16px;
    }

    .am-input-group {
        position: relative
    }

    .weui-picker__action {
        color: #0e90d2;
    }

    .am-form-field {
        color: #000;
    }

    .xinxiTitle {
        padding: 0px 12px;
        margin-top: 5px;
        height: 38px;
        line-height: 38px;
        background: #fff;
    }
    .xinxibox {
        background: #FFF;
        padding: 10px;
    }
    .xinxiTITLE_2 {
        padding: 0 12px;
        height: 38px;
        line-height: 38px;
        background: transparent;
        margin-bottom: 10px;
        color: #777;
    }
    .am-btn-primary{
        border-radius: 8px ;
    }
    .am-btn{
    font-size: 14px; 
    color: #fff;
    padding: 10px;
    outline: none;
    background-color:rgba(0,0,0,0);
    border:none;
    }

    #bianhao{
        font-size: 12px;
    }
    .feil{
            color: #1197ff;
        }
        .button {
            width: 90%;
            margin: 30px auto;
            display: block;
            outline: none;
            background: #1197ff; 
            border-radius: 5px;
            height: 40px;
        }
        .list_box{
            border-bottom: 1px solid #dadada99;
        }
        .xinxibox>.list_box:last-child{
            border: none;
        }
</style>

<body>
        <div class="shenhe" style="
    position: fixed;
    width: 45%;
    right: 10px;
    bottom: 14px;
    background: #1197ff;
    color: #fff;
    z-index: 9999;
    border: 1px solid #1284dc;

    display: block;
    outline: none;
    background: #1197ff;
    border-radius: 5px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    color: #fff;
    ">
        提交审核
    </div>
        <div data-am-widget="tabs"  style="margin:0;background: #FFF;" class="box am-tabs am-tabs-default">
                <ul style="background: #FFF;" class="am-tabs-nav am-cf">
                    <li onclick="window.location.href='./dingdanxinxi.html?id='+GetQueryString('id')+'&SerialNumber='+GetQueryString('SerialNumber')" class="am-active">
                        <a href="javascript:;">订单详情</a>
                    </li>
                    <li onclick="window.location.href='./diyaxinxi.html?id='+GetQueryString('id')+'&SerialNumber='+GetQueryString('SerialNumber')" class="">
                        <a href="javascript:;">抵押信息</a>
                    </li>
                    <li onclick="window.location.href='./daikuanxinxi.html?id='+GetQueryString('id')+'&SerialNumber='+GetQueryString('SerialNumber')" class="">
                        <a href="javascript:;">贷款信息</a>
                    </li>
                    <li onclick="window.location.href='./diaochazongshu.html?id='+GetQueryString('id')+'&SerialNumber='+GetQueryString('SerialNumber')" class="">
                        <a href="javascript:;">调查综述</a>
                    </li>
                    <li onclick="window.location.href='./zhaopian.html?id='+GetQueryString('id')+'&SerialNumber='+GetQueryString('SerialNumber')" class="">
                        <a href="javascript:;">照片</a>
                    </li>
                </ul>
            </div>
    <div class="xinxiTitle " id="bianhao">
        订单编号：HD201802032268
    </div>
    <div class="xinxiTITLE_2">
        借款人信息
    </div>
    <div class="xinxibox">
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">姓名：</span>
                <input type="text" class="am-form-field input" name="Name" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">性别：</span>
                <div class="am-form-group am-form-field">
                    <label class="am-radio-inline">
                        <input type="radio" value="0" name="Sex"> 男
                    </label>
                    <label class="am-radio-inline">
                        <input checked type="radio" value="1" name="Sex"> 女
                    </label>
                </div>
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">婚姻：</span>
                <div class="am-form-group am-form-field">
                    <label class="am-radio-inline">
                        <input checked type="radio" class="Marriage" value="1" name="Marriage">未婚
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" class="Marriage" value="0" name="Marriage"> 已婚
                    </label>
                </div>
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">年龄：</span>
                <input type="number" min="0" class="am-form-field input" name="Age" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">户籍：</span>
                <input type="text" class="am-form-field input" name="HousrHoldReg" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">户口性质：</span>
                <input type="text" class="am-form-field input" name="HousrHoldRegType" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">民族：</span>
                <input type="text" class="am-form-field input" name="National" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">身份证号：</span>
                <input type="text" class="am-form-field input" name="IdCard" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">签发机关：</span>
                <input type="text" class="am-form-field input" name="IssuingAuthority" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group ">
                <span class="am-input-group-label">证件有效期(开始日期)：</span>
                <input type="text" class="am-form-field input time" id="datetimepicker" readonly="readonly" name="StartValidity"
                    placeholder="请输入日期" onclick="laydate({istime: true,format:'YYYY-MM-DD'})">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group ">
                <span class="am-input-group-label">证件有效期(结束日期)：</span>
                <input type="text" name="EndValidity" readonly="readonly" placeholder="请输入日期" onclick="laydate({istime: true,format:'YYYY-MM-DD'})"
                    class="am-form-field input time">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">健康状况：</span>
                <input type="text" name="HealthState" class="am-form-field input" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">学历：</span>
                <input type="text" name="Edu" class="am-form-field input" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">是否有不良倾向：</span>
                <div class="am-form-group am-form-field">
                    <label class="am-radio-inline">
                        <input checked type="radio" value="1" name="BadTendency"> 否
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" value="0" name="BadTendency"> 是
                    </label>
                </div>
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">联系电话：</span>
                <input type="text" class="am-form-field input" name="Phone" placeholder="请输入">
            </div>
        </div>
        <div class="xinxiTitle">
            职业信息
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">职业：</span>
                <input type="text" class="am-form-field input" name="Professional" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">职务：</span>
                <input type="text" class="am-form-field input" name="Position" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">职称：</span>
                <input type="text" class="am-form-field input" name="TheTitle" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">工作单位：</span>
                <input type="text" class="am-form-field input" name="WorkUnits" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">工作单位地址：</span>
                <input type="text" class="am-form-field input" name="WorkAddress" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">工作单位性质：</span>
                <input type="text" class="am-form-field input" name="WorkNature" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">单位所属行业：</span>
                <input type="text" class="am-form-field input" name="Subordinate" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">本单位工作起始日：</span>
                <input type="text" class="am-form-field input time" name="StartingDate" id="datetimepicker3" readonly="readonly" placeholder="请输入日期" onclick="laydate({istime: true,format:'YYYY-MM-DD'})">
            </div>
        </div>
    </div>
    <div class="xinxiTITLE_2 peiou">主借款人配偶信息</div>
    <div class="xinxibox peiou">
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">姓名：</span>
                <input type="text" class="am-form-field input" name="SpouseName" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">性别：</span>
                <div class="am-form-group am-form-field">
                    <label class="am-radio-inline">
                        <input checked type="radio" value="0" name="SpouseSex"> 男
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" value="1" name="SpouseSex"> 女
                    </label>
                </div>
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">婚姻：</span>
                <div class="am-form-group am-form-field">
                    <label class="am-radio-inline">
                        <input checked type="radio" value="1" name="SpouseMarriage"> 未婚
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" value="0" name="SpouseMarriage"> 已婚
                    </label>
                </div>
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">年龄：</span>
                <input type="number" class="am-form-field input" name="SpouseAge" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">户籍：</span>
                <input type="text" class="am-form-field input" name="SpouseHourseHold" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">户口性质：</span>
                <input type="text" class="am-form-field input" name="SpouseHourseHoldType" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">民族：</span>
                <input type="text" class="am-form-field input" name="SpouseNational" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">身份证号：</span>
                <input type="text" class="am-form-field input" name="SpouseIdCard" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">健康状况：</span>
                <input type="text" class="am-form-field input" name="SpouseHealthState" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">学历：</span>
                <input type="text" class="am-form-field input" name="SpouseEdu" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">是否有不良倾向：</span>
                <div class="am-form-group am-form-field">
                    <label class="am-radio-inline">
                        <input checked type="radio" value="1" name="SpouseBadTendency"> 否
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" value="0" name="SpouseBadTendency"> 是
                    </label>
                </div>
            </div>
        </div>
    </div>
    <div class="xinxiTITLE_2">
        资产信息
    </div>
    <div class="xinxibox">
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">家庭成员数：</span>
                <input type="text" class="am-form-field input" name="FamilyNumber" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">家庭劳动力数：</span>
                <input type="text" class="am-form-field input" name="FamilyForce" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">家庭月基本收入数：</span>
                <input type="text" class="am-form-field input" name="FamilyMonthlyIncome" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">个人月收入：</span>
                <input type="text" class="am-form-field input" name="PersonalMonthlyIncome" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">房屋情况：</span>
                <input type="text" class="am-form-field input" name="HourseState" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">车辆情况：</span>
                <input type="text" class="am-form-field input" name="CarState" placeholder="请输入">
            </div>
        </div>
    </div>
    <div class="xinxiTITLE_2">
        借款人亲属信息
    </div>
    <div class="xinxibox">
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">与借款人关系：</span>
                <input type="text" class="am-form-field input" name="Relationship" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">姓名：</span>
                <input type="text" class="am-form-field input" name="RelativesName" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">年龄：</span>
                <input type="text" class="am-form-field input" name="RelativesAge" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">家庭月基本收入数：</span>
                <input type="text" class="am-form-field input" name="RelativesMonthlyIncome" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">工作单位：</span>
                <input type="text" class="am-form-field input" name="RelativesWorkUnits" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">联系电话：</span>
                <input type="text" class="am-form-field input" name="RelativesPhone" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">是否亲见：</span>
                <div class="am-form-group am-form-field">
                    <label class="am-radio-inline">
                        <input checked type="radio" value="1" name="Witness"> 否
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" value="0" name="Witness"> 是
                    </label>
                </div>
            </div>
        </div>
    </div>
    <div class="xinxiTITLE_2">
        其他紧急联系人信息
    </div>
    <div class="xinxibox">
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">与借款人关系：</span>
                <input type="text" class="am-form-field input" name="OtherRelationship" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">姓名：</span>
                <input type="text" class="am-form-field input" name="OtherRelativesName" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">年龄：</span>
                <input type="text" class="am-form-field input" name="OtherRelativesAge" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">家庭月基本收入数：</span>
                <input type="text" class="am-form-field input" name="OtherRelativesMonthlyIncome" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">工作单位：</span>
                <input type="text" class="am-form-field input" name="OtherRelativesWorkUnits" placeholder="请输入">
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">是否亲见：</span>
                <div class="am-form-group am-form-field">
                    <label class="am-radio-inline">
                        <input checked type="radio" value="1" name="OtherWitness"> 否
                    </label>
                    <label class="am-radio-inline">
                        <input type="radio" value="0" name="OtherWitness"> 是
                    </label>
                </div>
            </div>
        </div>
        <div class="list_box">
            <div class="am-input-group">
                <span class="am-input-group-label">联系电话：</span>
                <input type="text" class="am-form-field input" name="OtherRelativesPhone" placeholder="请输入">
            </div>
        </div>
    </div>
    <div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">提示</div>
            <div class="am-modal-bd cont">
            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn">确定</span>
            </div>
        </div>
    </div>
    <div class="zancun" style="
    width: 45%;
    position: fixed;
    left: 10px;
    bottom: 14px;
    background: rgb(17, 151, 255);
    font-size: 13px;
    border-radius: 5px;
    text-align: center;
    line-height: 39px;
    color: rgb(255, 255, 255);
    z-index: 2;
   ">
        <span>
            暂存信息
        </span>
    </div>
    <button class="button am-btn am-btn-primary">提交</button>
    <div class="zancun" style="    width: 90%;
    margin: 30px auto;
    display: block;
    outline: none;
    background: #1197ff;
    border-radius: 5px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    color: #fff;
    ">
        <span>
            暂存信息
        </span>
    </div>
    <div class="shenhe" style="
    width: 90%;
    margin: 30px auto;
    display: block;
    outline: none;
    background: #1197ff;
    border-radius: 5px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    color: #fff;
">
    提交审核
</div>
    <script src="../../js/jquery-3.2.1.min.js"></script>
    <script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>
    <script src="../../js/amazeui.js"></script>
    <script src="../../js/jquery.datetimepicker.js"></script>
    <style>
        input[readonly="readonly"] {
            background: #fff !important;
        }
    </style>
    <script>
            localStorage.setItem('zhi', GetQueryString('id'))
            localStorage.setItem('SerialNumber', GetQueryString('SerialNumber'))
            function GetQueryString(name) {
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
                var r = window.location.search.substr(1).match(reg);
                if (r != null) return unescape(r[2]);
                return null;
            }
            var http = localStorage.getItem('http')
            var UserId = localStorage.getItem('UserId')
            var Access_token = localStorage.getItem('Access_token')
            var Refresh_token = localStorage.getItem('Refresh_token')
        var myDate = new Date();
        $('.time').val(myDate.toLocaleDateString().replace(/\//g,'-')).css('border', 'none')
        $('.peiou').hide();
        peiou = 1
        $('.Marriage').change(function () {
            if ($('.Marriage').eq(0).prop('checked') == true) {
                peiou = 1
                $('.peiou').hide();
            } else {
                peiou = 0
                $('.peiou').show();
            }
            console.log(peiou);
        })
        var zhi = localStorage.getItem('zhi')
        var SerialNumber = localStorage.getItem('SerialNumber')
        var http = localStorage.getItem('http') 
        var UserId = localStorage.getItem('UserId')
        var Access_token = localStorage.getItem('Access_token')
        var Refresh_token = localStorage.getItem('Refresh_token');
        $('#bianhao').text('订单编号：' + SerialNumber);

        $.ajax({
            type: 'GET',
            url: http + '/api/prosprct/GetAllOrderMes',
            headers: {
                "Authorize": Access_token + '|' + Refresh_token
            },
            data: {
                keyValue: zhi
            },
            success: function (data) {
                console.log(JSON.stringify(data));
                dataarr = Object.keys(data.resultdata)
                for (var datakeys = 0; datakeys < Object.keys(data.resultdata).length; datakeys++) {
                    var MM = $("input[name=\'" + dataarr[datakeys] + "']")
                    var type = MM.attr('type')
                    if (type == 'text') {
                        if(data.resultdata[dataarr[datakeys]]!=0){
                        MM.val(data.resultdata[dataarr[datakeys]])
                        }
                    } else if (type == 'radio') {
                        if (data.resultdata[dataarr[datakeys]] == true) {
                            $("input[name=\'" + dataarr[datakeys] + "']").removeAttr('checked');
                            $("input[name=\'" + dataarr[datakeys] + "']input[value='0']").prop('checked', true);
                        } else {
                            $("input[name=\'" + dataarr[datakeys] + "']").removeAttr('checked');
                            $("input[name=\'" + dataarr[datakeys] + "']input[value='1']").prop('checked', true);
                        }
                        if ($('.Marriage').eq(0).prop('checked') == true) {
                            peiou = 1
                            $('.peiou').hide();
                        } else {
                            peiou = 0
                            $('.peiou').show();
                        }
                    } else if (type = 'number') {
                        if(data.resultdata[dataarr[datakeys]]!=0){
                        MM.val(data.resultdata[dataarr[datakeys]])
                        }
                    } else if (type = 'checkbox') {
                        $("input[name=\'" + dataarr[datakeys] + "']").prop('checked')
                    } else if (type = 'file') {
                        $("input[name=\'" + dataarr[datakeys] + "']").attr('srcimg', data.resultdata[dataarr[datakeys]]);
                        $("input[name=\'" + dataarr[datakeys] + "']").parent().find('img').attr('src', '../../images/yes.svg');
                    }
                }
            },
            error: function (err) {
                alert('获取数据失败')
                console.log(JSON.stringify(err));
            }
        })
        $(function () {
            console.log($('.input').eq(7).val())
            $('.zancun').on('click', function () {

                var obj = {}

                for (var i = 0; i < $('.input').length; i++) {
                    var Name = $('.input').eq(i).attr('name');
                    if ($('.input').eq(i)[0].localName == 'input') {
                        if (Name == 'StartValidity') {
                            if ($('.input').eq(i).val() == ''){
                            var te = $('.input').eq(i).parent().find('span').text()
                            $(".cont").text('请输入' + te.replace('：', ''))
                            $('#my-alert').modal('open');
                            return
                            }
                        }
                        if (Name == 'EndValidity') {
                            if ($('.input').eq(i).val() == ''){
                            var te = $('.input').eq(i).parent().find('span').text()
                            $(".cont").text('请输入' + te.replace('：', ''))
                            $('#my-alert').modal('open');
                            return
                            }
                        }
                        obj[Name] = $('.input').eq(i).val()
                    } else {
                        obj[Name] = $('.input').eq(i).text()
                    }
                }

                for (var lpl = 0; lpl < $('input[type="radio"]').length; lpl++) {
                    if ($('input[type="radio"]').eq(lpl).prop('checked') == true) {
                        var lpltext = $('input[type="radio"]').eq(lpl).val()
                        var lplname = $('input[type="radio"]').eq(lpl).attr('name')
                        if (lpltext == '0') {
                            lpltext = true;
                        } else {
                            lpltext = false;
                        }
                        obj[lplname] = lpltext
                    }
                }
                console.log(JSON.stringify(obj));
                $.ajax({
                    type: 'POST',
                    url: http + '/api/prosprct/TSOrderMes?keyWord=' + zhi,
                    headers: {
                        "Authorize": Access_token + '|' + Refresh_token
                    },
                    data: obj,
                    success: function (data) {
                        console.log(JSON.stringify(data));
                        $(".cont").text(data.message)
                        $('#my-alert').modal('open')
                        return
                    },
                    error: function (err) {
                        console.log(JSON.stringify(err));

                    }

                })
            })
            $('.button').click(function () {
                $('body').append(`<div style="z-index:99999999999999;top:0;
        left:0;position:fixed;width:100%;height:100%;" class="loidn">
                <div style="width:100%;position:absolute;top:50%;left:0%;text-align:center;transform:translateYs(-50%);">请稍等</div>
            </div>`)
                for (var p = 0; p < $('.input').length; p++) {
                    if ($('.input').eq(p)[0].localName == 'input') {
                        if ($('.input').eq(p).val() == '') {
                            if (peiou == 1) {
                                if ($('.input').eq(p).parent().parent().parent().prev().text() == '主借款人配偶信息') {
                                    console.log($('.input').eq(p).parent().parent().parent().prev().text());
                                } else {
                                    console.log($('.input').eq(p).parent().parent().parent().prev().text());
                                    console.log(peiou);
                                    var te = $('.input').eq(p).parent().find('span').text()
                                    $(".cont").text('请输入' + te.replace('：', ''))
                                    $('.loidn').remove()
                                    $('#my-alert').modal('open')
                                    $('.button').removeAttr('disabled');
                                    return
                                }
                            } else {
                                var te = $('.input').eq(p).parent().find('span').text()
                                $(".cont").text('请输入' + te.replace('：', ''))
                                $('#my-alert').modal('open')
                                $('.loidn').remove()
                                $('.button').removeAttr('disabled')
                                return
                            }
                        }
                    } else if ($('.input').eq(p)[0].localName == 'div') {
                        if ($('.input').eq(p).text().length == 205) {
                            var te = $('.input').eq(p).parent().find('span').text()
                            $(".cont").text('请选择' + te.replace('：', ''))
                            $('#my-alert').modal('open')
                            $('.button').removeAttr('disabled')
                            $('.loidn').remove()
                            return
                        }
                    }
                }
                var obj = {}
                for (var i = 0; i < $('.input').length; i++) {
                    var Name = $('.input').eq(i).attr('name');
                    if ($('.input').eq(i)[0].localName == 'input') {
                        obj[Name] = $('.input').eq(i).val()
                    } else {
                        obj[Name] = $('.input').eq(i).text()
                    }
                }

                for (var lpl = 0; lpl < $('input[type="radio"]').length; lpl++) {
                    if ($('input[type="radio"]').eq(lpl).prop('checked') == true) {
                        var lpltext = $('input[type="radio"]').eq(lpl).val()
                        var lplname = $('input[type="radio"]').eq(lpl).attr('name')
                        if (lpltext == '0') {
                            lpltext = true;
                        } else {
                            lpltext = false;
                        }
                        obj[lplname] = lpltext
                    }
                }
                console.log(JSON.stringify(obj))
                $.ajax({
                    type: 'POST',
                    url: http + '/api/prosprct/OrderInfo?keyWord=' + zhi,
                    headers: {
                        "Authorize": Access_token + '|' + Refresh_token
                    },
                    async: false,
                    data: obj,
                    dataType: "json",
                    success: function (data) {
                        console.log(JSON.stringify(data))
                        $(".cont").text(data.message)
                        $('.loidn').remove()
                        $('#my-alert').modal('open')
                    },
                    error: function (err) {
                        console.log(JSON.stringify(err))
                        $('.loidn').remove()
                    }
                })
            })
        })
        $(window).scroll(function() {
        var x = $(document).scrollTop() + $(window).height() - $(".button").height();
        if (x + 100 > $(document).height()) {
            $('.zancun').eq(0).hide();
            $('.shenhe').eq(0).hide();
        }else{
            $('.zancun').eq(0).show();
            $('.shenhe').eq(0).show();
        }
    });
    $('.shenhe').on('click', function () {
                $.ajax({
                    type: 'POST',
                    url: http + '/api/prosprct/SaveExploitation?keyWord='+zhi,
                    headers: {
                        "Authorize": Access_token + '|' + Refresh_token
                    },
                    data: {},
                    success: function (data) {
                        console.log(JSON.stringify(data));
                        alert(data.message)
                        if (data.type==1) {
                            window.location.replace("../dingfan.html")
                        }
                    },
                    error: function (err) {
                        console.log(JSON.stringify(err));
                    }
                })
            })
    </script>
</body>

</html>